//
// Created by hoyin on 2021/12/31.
//

#include <iostream>
#include "ros/ros.h"
#include "include/ImageCatcher.h"
#include "include/ImagePublisher.h"

int main(int argc, char** argv) {
	ros::init(argc, argv, "composite_publisher");
	ros::NodeHandle nh;
	ImageCatcher ic(2, 1920*2, 1080, "MJPG");
	ic.setFilename("photo_shot");
	ImageTopics imageTopics;
	imageTopics.originImageTopic = "/composite_publisher/image_raw";
	imageTopics.leftImageTopic = "/image_publisher/left/image_raw";
	imageTopics.rightImageTopic = "/image_publisher/right/image_raw";
	ImagePublisher ip(nh, imageTopics);
	while (ros::ok()) {
		ip.publishComposite(ic);
		ros::spinOnce();
	}
	return 0;
}